import { Shape, Markup } from '@antv/x6'

class RuleChainEdge {
  constructor(graph) {
    this.edge = null
    this.graph = graph
    this._init()
  }

  _init() {
    Shape.Edge.config({
      connector: 'rounded',
      router: 'manhattan',
      // router: 'eclipse',
      attrs: {
        line: {
          stroke: '#30323e',
          strokeWidth: 2,
          targetMarker: {
            name: 'block',
            fill: '#30323e'
          }
        }
      },
      defaultLabel: {
        markup: Markup.getForeignObjectMarkup(),
        attrs: {
          fo: {
            width: 80,
            height: 30,
            x: -36,
            y: -18
          }
        },
        position: {
          distance: 0.5
        }
      }
    })
  }
}

export default RuleChainEdge
